package ph.com.gs3.formalistics.model.valueobjects.application;

import android.os.Parcel;
import android.os.Parcelable;

public class FormStub implements Parcelable {

	public String dbId;
	public String webId;
	public String name;

	@Override
	public String toString() {
		return name;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(dbId);
		dest.writeString(webId);
		dest.writeString(name);
	}

	public static final Parcelable.Creator<FormStub> CREATOR = new Parcelable.Creator<FormStub>() {

		@Override
		public FormStub createFromParcel(Parcel source) {
			return FormStub.createFromParcel(source);
		}

		@Override
		public FormStub[] newArray(int size) {
			return new FormStub[size];
		}

	};

	private static FormStub createFromParcel(Parcel source) {
		FormStub stub = new FormStub();

		stub.dbId = source.readString();
		stub.webId = source.readString();
		stub.name = source.readString();

		return stub;
	}

}
